package light.head.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Formula;
/**
 *	公司图片表
 */
@Entity
@Table
public class OrganSynopsisAnnex implements Serializable{
	private static final long serialVersionUID = -116130865727890529L;
	private Integer code;							// 流水号
	private Integer odc;							// 对应公司编号
	private String name;							// 文件名
	private String sn;								// 系统生成的文件名
	private Integer size;							// 文件大小
	private String ext;								// 后缀名
	private Boolean cover = false;					// 页面显示图片 0.不显示 1.是显示
	private Boolean deleted = false;				// 是否删除
	private Byte type;								// 图片类型（1.logo，2.背景，3.首页图，4.展示图 ）
	
	
	private String on;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column
	public Integer getCode() {
		return code;
	}
	@Column
	public Integer getOdc() {
		return odc;
	}
	@Column
	public String getName() {
		return name;
	}
	@Column
	public String getSn() {
		return sn;
	}
	@Column
	public Integer getSize() {
		return size;
	}
	@Column
	public String getExt() {
		return ext;
	}
	@Column
	public Boolean getCover() {
		return cover;
	}
	@Column
	public Boolean getDeleted() {
		return deleted;
	}
	@Column
	public Byte getType() {
		return type;
	}
	@Formula("(SELECT o.name FROM Organ o WHERE o.code = odc)")
	public String getOn() {
		return on;
	}
	
	
	
	
	public void setOn(String on) {
		this.on = on;
	}
	public void setType(Byte type) {
		this.type = type;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public void setOdc(Integer odc) {
		this.odc = odc;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setSn(String sn) {
		this.sn = sn;
	}
	public void setSize(Integer size) {
		this.size = size;
	}
	public void setExt(String ext) {
		this.ext = ext;
	}
	public void setCover(Boolean cover) {
		this.cover = cover;
	}
	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}
	
	
	
}
